<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>选择城市</title>
		<link href="__PUBLIC__/css/mui.min.css" rel="stylesheet" />
		<link href="__PUBLIC__/css/mui.indexedlist.css" rel="stylesheet" />
		<script type="text/javascript" src="__PUBLIC__/js/jquery-3.2.1.min.js"></script>

		<style>
			html,
			body {
				height: 100%;
				overflow: hidden;
			}
			.mui-bar {
				-webkit-box-shadow: none;
				box-shadow: none;
			}
		</style>
	</head>

	<body>
		<div>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">选择城市</h1>
		</header>
		<div class="mui-content">
			<div id='list' class="mui-indexed-list" style="height: 695px">
				<div class="mui-indexed-list-search mui-input-row mui-search">
					<input type="search" class="mui-input-clear mui-indexed-list-search-input" placeholder="输入城市名称">
				</div>
				<ul class="mui-table-view">
					<li data-group="A" class="mui-table-view-divider mui-indexed-list-group">当前城市</li>
					<li _id="a" data-value="AKU" data-tags="AKeSu" class="mui-table-view-cell mui-indexed-list-item">{$Current_City}</li>
				</ul>
				<div class="mui-indexed-list-bar" style="overflow: auto;height: 450px">

					<!--<a href="#e">E</a>-->
					<foreach name="cityList" item="vo">
						<a href="#{$vo.idx}">{$vo.idx}</a>
					</foreach>
				</div>
				<div class="mui-indexed-list-alert"></div>
				<div class="mui-indexed-list-inner">
					<div class="mui-indexed-list-empty-alert">没有数据</div>
					<ul class="mui-table-view">
						<!--<li data-group="A" class="mui-table-view-divider mui-indexed-list-group">A</li>
						<li data-value="AKU" data-tags="AKeSu" class="mui-table-view-cell mui-indexed-list-item">阿克苏机场</li>
						<li data-value="BPL" data-tags="ALaShanKou" class="mui-table-view-cell mui-indexed-list-item">阿拉山口机场</li>
						<li data-value="AAT" data-tags="ALeTai" class="mui-table-view-cell mui-indexed-list-item">阿勒泰机场</li>
						<li data-value="NGQ" data-tags="ALiKunSha" class="mui-table-view-cell mui-indexed-list-item">阿里昆莎机场</li>
						<li data-value="AQG" data-tags="AnQingTianZhuShan" class="mui-table-view-cell mui-indexed-list-item">安庆天柱山机场</li>
						<li data-value="MFM" data-tags="AoMenGuoJi" class="mui-table-view-cell mui-indexed-list-item">澳门国际机场</li>-->
							<foreach name="cityList" item="vo">
								<if condition="count($vo[city]) lt 1">
									<php>continue;</php>
								</if>
								<!--城市代码-->
								<li style="cursor:pointer "  data-group="{$vo.idx}" class="mui-table-view-divider mui-indexed-list-group">{$vo.idx}</li>
								<foreach name="vo.city" item="v">
									<!--城市列表-->
									<li _id="a" style="cursor:pointer " data-value="AKU" data-tags="AKeSu" class="mui-table-view-cell mui-indexed-list-item">{$v.name}</li>
								</foreach>
							</foreach>
					</ul>
				</div>
			</div>
		</div>
		</div>
		<script src="__PUBLIC__/js/mui.min.js"></script>
		<script src="__PUBLIC__/js/mui.indexedlist.js"></script>
		<script type="text/javascript" charset="utf-8">
			mui.init();
			mui.ready(function() {
				var header = document.querySelector('header.mui-bar');
				var list = document.getElementById('list');
				//calc hieght
				list.style.height = (document.body.offsetHeight - header.offsetHeight) + 'px';
				//create
				window.indexedList = new mui.IndexedList(list);
			});
            $('[_id="a"]').click(function () {
				var valued = $(this).html();
				parent.window.document.getElementById("city").value = valued;
				var index = parent.layer.getFrameIndex(window.name);
				parent.layer.close(index)
            })
		</script>
	</body>

</html>